package xyhoo.springframework.beans.factory;

import xyhoo.springframework.beans.FatalBeanException;

/**
 * 当 BeanFactory 遇到无效的 Bean 定义时抛出的异常，例如：Bean 元数据不完整或存在冲突
 */
public class BeanDefinitionStoreException extends FatalBeanException {

    private final String beanName;

    private final String resourceDescription;

    public BeanDefinitionStoreException(String msg) {
        super(msg);
        beanName = null;
        resourceDescription = null;
    }

    public BeanDefinitionStoreException(String msg, Throwable cause) {
        super(msg, cause);
        beanName = null;
        resourceDescription = null;
    }

    public BeanDefinitionStoreException(String description, String msg, Throwable cause) {
        super(msg, cause);
        beanName = null;
        resourceDescription = description;
    }
}
